package charpter14.lynx;

import java.lang.reflect.Field;

public class Nine {
    public static void main(String[] args) {
        listSuper(new Rhomboid());
    }


    public static void listSuper(Object o) {
        Class<?> c = o.getClass();
        while (c != null) {
            System.out.println(c.getName());
            for (Field field : c.getDeclaredFields()) {
                System.out.print(field.getName() + "|");
            }
            c = c.getSuperclass();
        }
    }
}
